package com.simp.app.ui.activity;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

import com.antonioleiva.mvpexample.app.R;
import com.simp.app.base.BaseActivity;
import com.simp.app.presenter.RegisterPresenter;
import com.simp.app.presenter.impl.RegisterPresenterImpl;
import com.simp.app.view.RegisterView;

/**
 * Created by hanWG on 2015-10-21 下午5:24:58 $
 * 
 * @Description 注册
 * 
 *              <p/>
 */
public class RegisterActivity extends BaseActivity implements RegisterView,
		OnClickListener {
	private EditText username;
	private EditText password;
	private RegisterPresenter regp;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_register);
		username = (EditText) findViewById(R.id.username);
		password = (EditText) findViewById(R.id.password);
		Button button = (Button) findViewById(R.id.button);
		button.setOnClickListener(this);
		regp = new RegisterPresenterImpl(this);
	}	
	@Override
	public void showLoading(String msg) {
	}
	@Override
	public void hideLoading() {
	}
	@Override
	public void showError(String msg) {
	}
	@Override
	public void showException(String msg) {
	}
	@Override
	public void showNetError() {

	}
	@Override
	public void message(String message) {
	}
	@Override
	public void onClick(View v) {
		regp.validateCredentials(username.getText().toString(), password.getText().toString());
	}

}
